var sql = include(	"sql.js"	);
//debug.show(	sql.insert("user_basic",	{"username":"sql:now()","password":"'123","state":true}));
function insert(	want,	sets	) {
	//var obj	=	{"face":"detail.jpg","last_login":"sql:now()"};
	//debug.show(	JSON.encode(	obj	)	);
	//var string	=	JSON.encode(	obj	);
	//string	=	string.escapeRegExpSql();
	//debug.show(	string	);
	//debug.show(JSON.decode(	string	));
	//sql.insert(	"db_insert",{'sets':string});

	var s		=	"SELECT id,want,sets,rs,table_name FROM db_insert WHERE want='"	+	want	+	"' ORDER BY order_is LIMIT 0,10";
	var rows	=	sql.getRs(	s	);
	var aims	=	[];
	if(	rows	){
		var row;
		while(row = rows.fetchObject()) {
			var defaultSets	=	row[	"sets"	];//.toString("utf-8")+"";
			//debug.show(defaultSets	);
			var defaultSetsObject	=	JSON.decode(	defaultSets	);
			var tablename	=	row[	"table_name"	];
			var rs	=	row[	"rs"	];
			var aim	=	{"tablename":tablename,"sets":defaultSetsObject,"rs":rs	};
			aims[aims.length]	=	aim;
			//var insertId	=	sql.insert(	tablename,	defaultSetsObject	);
			//
			//sets[	"rs_"	+	rs	+	"_id"]	=	insertId;
			//debug.show(	JSON.encode(sets	)	);
			//debug.show(JSON.encode(	obj	));
			//eval(	"response.print(1)");
			//debug.show(defaultSets);
			//var defaultSets	=	eval(defaultSets.toString("utf-8"));
		}
	}
	//debug.show(aims[0].sets);
	aims.each(	function(	aim,	index	) {
		//debug.show(	JSON.encode(	aim.sets.extendBy(	sets	)	)	);
		var insertId	=	sql.insert(	aim.tablename,	$extendBy(	aim.sets,	sets	)	);
		sets[	"rs_"	+	aim["rs"]	+	"_id"]	=	insertId;
	});
	//debug.show(	JSON.encode(sets));
	//var rows	=	sql.select(	"SELECT * FROM db_insert WHERE want='"	+	want	+	"' ORDER BY order_is LIMIT 0,10"	);
	//var row;
	//while(row = rows.fetchObject()){
	///	debug.show(row);
	//} 
	//sql.insert("user_basic",	{"username":"sql:now()","password":"'123","state":true})
}
function update(){

}
function select(	want	){

}
function validate(){

}